package com.anjiplus.template.gaea.business.modules.quartz.service.impl;

import com.anjiplus.template.gaea.business.modules.quartz.service.LogService;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

@Service
public class LogServiceImpl implements LogService {


    /**
     * 添加日志
     * @param
     * @throws
     */
    @Override
    public int loginfo(JdbcTemplate jdbcTemplate,String methodName, String ts, String state, String inJson, String outJson, String dateid, String yyid,String gsUrl,String TS) {
        String logInsert = "INSERT INTO gs_yy_log(methodName, ts, state, inJson, outJson, dateid, yyid, gsUrl ,yyts) " +
                "VALUES " +
                "('"+methodName+"', '"+ts+"', '"+state+"', '"+inJson+"', '"+outJson+"', '"+dateid+"','"+yyid+"','"+gsUrl+"','"+TS+"');";
        int loginsert = jdbcTemplate.update(logInsert);
        return loginsert;
    }
}
